package de.hska.algo.labor2010.strecken;

import org.junit.Assert;
import org.junit.Test;

public class PointTest {

	@Test
	public void testPointDoubleDouble() {
		Point test = new Point(1.0, 1.0);
		Assert.assertEquals(1.0, test.getX(), 1.9e-16);
		Assert.assertEquals(1.0, test.getY(), 1.9e-16);
	}

	@Test
	public void testPointPoint() {
		Point point = new Point(1.0, 1.0);
		Point test = new Point(point);
		Assert.assertEquals(1.0, test.getX(), 1.9e-16);
		Assert.assertEquals(1.0, test.getY(), 1.9e-16);
	}

	


	@Test
	public void testGetX() {
		Point test = new Point(1.0, 1.0);
		Assert.assertEquals(1.0, test.getX(), 1.9e-16);
		
	}

	@Test
	public void testSetX() {
		Point test = new Point(5.0, 1.0);
		test.setX(1.0);
		Assert.assertEquals(1.0, test.getX(), 1.9e-16);
		
	}

	@Test
	public void testGetY() {
		Point test = new Point(1.0, 1.0);
		Assert.assertEquals(1.0, test.getY(), 1.9e-16);
	}

	@Test
	public void testSetY() {
		Point test = new Point(5.0, 5.0);
		test.setY(1.0);
		Assert.assertEquals(1.0, test.getY(), 1.9e-16);
	}

}
